package com.exam.scjp5.objectives.section_4;

public class ExampleSynchronizedTest3 extends Thread
{
    private static int threadCounter;
    
    public void run()
    {
        threadCounter++;
        System.out.println(""+threadCounter);
    }
    
    public static void main(String[] args)
    {
        for(int i=0; i<10; i++)
        {
            synchronized(ExampleSynchronizedTest3.class)
            {
                new ExampleSynchronizedTest3().start();
            }
        }
    }
}
